<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=">
<title>后台管理系统</title>
<link rel="stylesheet" href="__PUBLIC__/Admin/css/css.css">
<script src="__PUBLIC__/Admin/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/Common/Layer/layer.js"></script>
<script src="__PUBLIC__/Common/Ueditor/ueditor.config.js"></script>
<script src="__PUBLIC__/Common/Ueditor/ueditor.all.min.js"> </script>
<script src="__PUBLIC__/Common/Ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="__PUBLIC__/Common/uploadPreview.min.js"></script>
<script>
   window.onload = function () { 
        new uploadPreview({ UpBtn: "pic_url", DivShow: "imgdiv", ImgShow: "imgShow" });
    }
</script>
<script>
    var ue = UE.getEditor('editor');
	var ue2 = UE.getEditor('editor2');
</script>
<script>
function check_form(){
	var title = $('#title').val();
	if(title == ''){
		layer.msg('活动名称不能为空');
		return false;
	}
	return true;
}
</script>
<script>
function copyUrl2(){
	var Url2=document.getElementById("biao1");
	Url2.select(); // 选择对象
	document.execCommand("Copy"); // 执行浏览器复制命令
	layer.msg('已复制好，可贴粘。');
}
</script>
</head>
<body>

<div class="nav">
	<div class="nav_title">
    	<h4><img class="nav_img" src="__PUBLIC__/Admin/img/tab.gif" /><span class="nav_a">商品管理 -> 编辑商品</span></h4>
    </div>
</div>
<form name="form3" method="post" action="__SELF__" enctype="multipart/form-data" onSubmit="return check_form();">
<div class="list">
	  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="details" style=" margin-top:2px;">
      	  <tr>
	        <td colspan="2" style=" background:#E4EEFA;"><h3 style="margin-left:50px;">一、基本信息</h3></td>
       	  </tr>
        <tbody>
			      <tr>
	        <td width="20%"><div align="right">本文链接：</div></td>
	        <td width="80%"><input type="text" style="width:600px;" name="zhuanti_url" id="biao1" value="http://{$_SERVER['HTTP_HOST']}{:U('Home/Index/tourism_details')}?id={$result.id}" readonly>
            <input type="button" onClick="copyUrl2()" style="padding:2px 15px; height:40px;" value="点击复制链接" />
            </td>
          </tr>
          <tr>
	        <td><div align="right">商品分类：</div></td>
	        <td><select name="class_id" id="class_id">
            <option value="{$result.class_id}">{$result.class_name}</option>
            	<option value="">----------</option>
            <foreach name="result_class" item="vo">
            	<option value="{$vo.id}">{$vo.class_name}</option>
            </foreach>
            </select></td>
          </tr>
	      <tr>
	        <td width="20%"><div align="right">
	        <div align="right"><span style="color:#F00;">*</span> 标题：</div></td>
	        <td width="80%">
	          <input name="title" type="text" class="input" id="title" size="80" value="{$result.title}"> <span style="color:#00F;">长度请限制在 30 字以内</span>
            </td>
          </tr>
	      <tr>
	        <td><div align="right"><span style="color:#F00;">*</span> 代表图片：</div></td>
	        <td><span style="color:#F00;">图片尺寸请使用 （ 200 * 200 ） 像素</span>
	           	<div id="imgdiv">
                <img style="height:100px; width:100px; border-radius:4px;" src="__PUBLIC__/Uploads/goods/{$result.pic_url}" />
	           	<img style="position:relative;top:6px;margin-right:30px;" id="imgShow" width="100" height="100" />
	           	<input type="file" name="pic_url" id="pic_url" /></div>   			
            </td>
          </tr>
	      <tr>
	        <td><div align="right">详情页大图：</div></td>
	        <td><span style="color:#F00;">图片尺寸请使用 （ 520 * 360 ） 像素</span>
            <div id="imgdiv2">
                <img style="height:100px; width:300px; border-radius:4px;" src="__PUBLIC__/Uploads/goods/{$result.pic_url2}" />
                <input type="file" name="pic_url2" id="pic_url2" />
            </div>
            </td>
          </tr>
	      <tr>
	        <td><div align="right">原价：</div></td>
	        <td><input type="text" style="color:#F00; font-weight:600;" name="price_old" id="price_old" value="{$result.price_old}">
            <span style="color:#00F;">元</span></td>
          </tr>
	      <tr>
	        <td><div align="right">现价：</div></td>
	        <td><input type="text" style="color:#F00; font-weight:600;" name="price_new" id="price_new" value="{$result.price_new}"> 
	        <span style="color:#00F;">元</span></td>
          </tr>
	      <tr>
	        <td><div align="right">库存：</div></td>
	        <td><input type="text" style="color:#F00; font-weight:600;" name="kucun" id="kucun" value="{$result.kucun}">
            <span style="color:#00F;">件</span></td>
          </tr>
	      <tr>
	        <td><div align="right">是否热销：</div></td>
	        <td><input type="radio" name="rexiao" id="rexiao" value="0" <if condition="$result.rexiao == 0"> checked="checked" </if> >&nbsp;&nbsp;
              <laber for="rexaio">否</label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="radio" name="rexiao" id="rexiao2" value="1" <if condition="$result.rexiao == 1"> checked="checked" </if> >
	          <laber for="rexaio2">是</label>
            </td>
          </tr>
	      <tr>
	        <td><div align="right">上下架：</div></td>
	        <td><input type="radio" name="shangjia" id="shangjia" value="1" <if condition="$result.shangjia == 1"> checked="checked" </if> >&nbsp;&nbsp;
              <laber for="shangjia">上架</label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="radio" name="shangjia" id="shangjia2" value="0" <if condition="$result.shangjia == 0"> checked="checked" </if> >
	          <laber for="shangjia2">下架</label></td>
          </tr>
	      <tr>
	        <td><div align="right">标签：</div></td>
	        <td><input name="keyword" type="text" id="keyword" class="input" size="80" value="{$result.keyword}">
            <span style="color:#00F;">多个标签，请用空格分隔开</span></td>
          </tr>
          <tr>
	        <td><div align="right">说明：</div></td>
	        <td><script id="editor" name="shuoming" type="text/plain" style="width:1000px;height:600px;">{$result.shuoming}</script></td>
          </tr>
	      <tr>
	        <td><div align="right">规格：</div></td>
	        <td><script id="editor2" name="guige" type="text/plain" style="width:1000px;height:600px;">{$result.guige}</script></td>
          </tr>
	      <tr>
	        <td><div align="right"></div></td>
	        <td>&nbsp;</td>
          </tr>
	      <tr>
	        <td><div align="right"></div></td>
	        <td>&nbsp;</td>
          </tr>
        </tbody>
  </table> 
</div>
<div class="footer">
	 <input type="hidden" name="id" value="{$result.id}" />
     <button type="submit" class="button" id="button" style="min-width:160px;" onclick="admin_add();">保存信息</button>
</div>
</form> 
</body>
</html>
